Texture2D Texture;
SamplerState Sampler;

float4 KawaseBlur(uint iteration, float2 tex)
{
    uint width, height;
    Texture.GetDimensions(width, height);
    float dist = 0.5f + (iteration - 1) * 1.0f;
    float dw = dist / width;
    float dh = dist / height;
    float4 color = float4(0.0f, 0.0f, 0.0f, 1.0f);
    color += Texture.Sample(Sampler, tex - float2(dw, dh));
    color += Texture.Sample(Sampler, tex + float2(dw, dh));
    color += Texture.Sample(Sampler, tex + float2(-dw, dh));
    color += Texture.Sample(Sampler, tex + float2(dw, -dh));
    color /= 4;
    return color;
}